<?php

declare(strict_types=1);

namespace Modules\Purchasing\Models;

use Catch\Base\CatchModel as Model;

/**
 * @property $id
 * @property $purchaseorder_id
 * @property $creator_id
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 * @property $purchaseorderschedule_id
 * @property $quantityreturned
 * @property $barcode
*/
class PurchasereturnAttached extends Model
{
    

    protected $table = 'purchasereturn_attached';

    protected $fillable = [ 'id','purchasereturn_id','purchaseorder_id', 'creator_id', 'created_at', 'updated_at', 'deleted_at', 'purchaseorderschedule_id', 'quantityreturned', 'barcode' ,'storagelocation','purchasewarehousing_id','provisionalschedule_id','fmaterialid','fpurchaseorgid_number','fpurchaseorgid_name','fsupplierid_number','fsupplierid_name','fpersonnelunittime','fownerid_number','funitid_number','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    protected array $fields = ['id','purchasereturn_id','purchaseorder_id','created_at','updated_at','purchaseorderschedule_id','quantityreturned','barcode','storagelocation','purchasewarehousing_id','provisionalschedule_id','fmaterialid','fpurchaseorgid_number','fpurchaseorgid_name','fsupplierid_number','fsupplierid_name','fpersonnelunittime','fownerid_number','funitid_number','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    protected array $form = ['id','purchasereturn_id','purchaseorder_id','created_at','updated_at','purchaseorderschedule_id','quantityreturned','barcode','storagelocation','purchasewarehousing_id','provisionalschedule_id','fmaterialid','fpurchaseorgid_number','fpurchaseorgid_name','fsupplierid_number','fsupplierid_name','fpersonnelunittime','fownerid_number','funitid_number','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];
     /**
     * @var array
     */
    public array $searchable = [
        'returnnumber' => 'like',
        'status' => '=',
    ];
   
    //输出相应的时间格式
    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i');
    }
    


    
}
